-- GENERATED SPELL FOR [Death Knight Adept] --


function spell0_31325(pUnit, Event) --@Blood Plague,n/a--
pUnit:FullCastSpellOnTarget(60950,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31325', 12000, 1)
end

function spell1_31325(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(60945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31325', 569, 1)
end

function spell2_31325(pUnit, Event) --@Death and Decay,n/a--
pUnit:FullCastSpellOnTarget(60953,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31325', 10000, 1)
end

function spell3_31325(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(60949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31325', 0, 1)
end

function spell4_31325(pUnit, Event) --@Frost Strike,n/a--
pUnit:FullCastSpellOnTarget(60951,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31325', 621, 1)
end

function Sorts_31325(pUnit, Event)
local choix_sorts_31325 = math.random(0, 4)
if choix_sorts_31325 == 0 then
pUnit:RegisterEvent('spell0_31325', 1, 1)
end
if choix_sorts_31325 == 1 then
pUnit:RegisterEvent('spell1_31325', 1, 1)
end
if choix_sorts_31325 == 2 then
pUnit:RegisterEvent('spell2_31325', 1, 1)
end
if choix_sorts_31325 == 3 then
pUnit:RegisterEvent('spell3_31325', 1, 1)
end
if choix_sorts_31325 == 4 then
pUnit:RegisterEvent('spell4_31325', 1, 1)
end
end

function mob31325_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31325', math.random(1500, 3000), 1)
end

function mob31325_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31325_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31325_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31325, 1, 'mob31325_Action')
RegisterUnitEvent(31325, 2, 'mob31325_Leave')
RegisterUnitEvent(31325, 3, 'mob31325_Kill')
RegisterUnitEvent(31325, 4, 'mob31325_Die')
